package com.example.account.controller;

import com.example.account.service.AccountService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.math.BigDecimal;

@RestController
public class AccountController {
    @Autowired
    private AccountService accountService;
    @GetMapping("/decrease")
    public String decrease(@Param("userId") Long userId, @Param("money") BigDecimal money){
        accountService.decrease(userId, money);
        return "扣减账户金额成功！";
    }
}
